<template>
  <Tree
      v-if="multiple"
      v-loading="loading"
      ref="tree"
      :data="treeData"
      node-key="id"
      :expand-on-click-node="false"
      :empty-text="errorMsg||emptyText"
      highlight-current :current-node-key="selectedKey"
      show-checkbox check-strictly check-on-click-node :default-checked-keys="checkedKeys"
      :style="treeStyle"
      @node-click="doNodeClick"
      @check="doCheck"
      @check-change="doCheckChange"
  />
  <Tree
      v-else
      v-loading="loading"
      ref="tree"
      :data="treeData"
      node-key="id"
      :expand-on-click-node="false"
      :empty-text="errorMsg||emptyText"
      highlight-current :current-node-key="selectedKey"
      :style="treeStyle"
      @node-click="doNodeClick"
  />
</template>
<script>
import TreeSelectJS from './TreeSelect.js'
export default {
  name: 'TreeSelect',
  mixins: [TreeSelectJS]
}
</script>
